from django.conf.urls.defaults import *
from django.views.generic.simple import redirect_to
from django.conf import settings
from feeds import BlogRss, BlogAtom

feeds = {
    'rss': BlogRss,
    'atom': BlogAtom
}


urlpatterns = patterns('',
    # Example:
    (r'^feeds/(?P<url>.*)/$', 'django.contrib.syndication.views.feed', {'feed_dict': feeds}),
    (r'^media/(.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    (r'^blog/', include('lab.blog.urls')),
    (r'^userpanel/', include('lab.userpanel.urls')),
    (r'^space/', include('lab.space.urls')),
    (r'^accounts/',include('lab.accounts.urls')),
    (r'^seminars/', include('lab.seminars.urls')),
    (r'^books/', include('lab.books.urls')),
    # Uncomment this for admin:
    (r'^admin/', include('django.contrib.admin.urls')),
    (r'^comments/', include('django.contrib.comments.urls.comments')),
    #(r'^$', direct_to_template, {'template': 'index.html'}),
    (r'^$', redirect_to, {'url': '/home/'}),
    (r'^home/$', 'lab.blog.views.public_list'),
    (r'^people/$', 'lab.userpanel.views.people_list'),
)
